package com.huang.eduservice.controller;

import com.huang.eduservice.entity.EduPublish;
import com.huang.eduservice.service.EduPublishService;
import com.hunag.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/eduservice/edu-publish")
public class PublishController {

    @Autowired
    private EduPublishService service;

    @GetMapping("/getPublishType")
    public R getType() {
        List<EduPublish> publishType = service.getPublishType();
        return R.ok().data("typelist", publishType);
    }
}
